import 'package:equatable/equatable.dart';
import 'todo.dart';
import 'project.dart' show Priority;

/// 待办任务创建请求
class TodoCreateRequest extends Equatable {
  final int? projectId;
  final String title;
  final String? description;
  final Priority priority;
  final TodoType todoType;
  final int? assigneeId;
  final DateTime? dueDate;
  final double? estimatedHours;

  const TodoCreateRequest({
    this.projectId,
    required this.title,
    this.description,
    required this.priority,
    required this.todoType,
    this.assigneeId,
    this.dueDate,
    this.estimatedHours,
  });

  @override
  List<Object?> get props => [
        projectId,
        title,
        description,
        priority,
        todoType,
        assigneeId,
        dueDate,
        estimatedHours,
      ];
}

/// 待办任务更新请求
class TodoUpdateRequest extends Equatable {
  final String? title;
  final String? description;
  final TodoStatus? status;
  final Priority? priority;
  final TodoType? todoType;
  final int? assigneeId;
  final DateTime? dueDate;
  final double? estimatedHours;
  final double? actualHours;

  const TodoUpdateRequest({
    this.title,
    this.description,
    this.status,
    this.priority,
    this.todoType,
    this.assigneeId,
    this.dueDate,
    this.estimatedHours,
    this.actualHours,
  });

  @override
  List<Object?> get props => [
        title,
        description,
        status,
        priority,
        todoType,
        assigneeId,
        dueDate,
        estimatedHours,
        actualHours,
      ];
}
